import request from '../utils/request.js';

export default {
    classInfo: {
        //多条件查询班级
        queryList: (params) => {
            return request({
                url: '/qian/api/class/list',
                method: 'get',
                data: params
            });
        },
        //根据ID查询班级信息
        getById: (id) => {
            return request({
                url: `/qian/api/class/getById/${id}`,
                method: 'get',
            });
        },
        //新增班级
        create: (params) => {
            return request({
                url: '/qian/api/class/create',
                method: 'post',
                data: params
            });
        },
        //根据ID删除班级信息
        deleteById: (id) => {
            return request({
                url: `/qian/api/class/deleteById/${id}`,
                method: 'delete',
            });
        },
        //修改班级
        modify: (params) => {
            return request({
                url: '/qian/api/class/updateById',
                method: 'patch',
                data: params
            });
        },
    },
    //学生管理
    student: {
        queryPage: (params) => {
            return request({
                url: '/qian/api/student/pageList',
                method: 'get',
                data: params
            });
        }
    },
    department: {
        queryList(params) {
            return request({
                url: '/qian/api/department/queryList',
                data: params,
                method: 'get',
            })
        },
        deleteById(depId) {
            return request({
                url: `/qian/api/department/deleteById/${depId}`,
                method: 'delete',
            })
        },
        create(params) {
            return request({
                url: '/qian/api/department/create',
                data: params,
                method: 'post',
            })
        },
        modify(params) {
            return request({
                url: '/qian/api/department/updateById',
                data: params,
                method: 'patch',
            })
        },
        getById(depId) {
            return request({
                url: `/qian/api/department/getById/${depId}`,
                method: 'get',
            })
        },
    }
}